﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataProcesss.model
{
    public class Data:ICloneable
    {
        public string Time { get; set; }
        private double _furnaceCoverTemperature;
        public double FurnaceCoverTemperature
        {
            get => _furnaceCoverTemperature;
            set => _furnaceCoverTemperature = Math.Round(value, 2);
        }
        public double FurnaceTubeTemperature1 { get; set; } //炉管1
        public double FurnaceTubeTemperature2 { get; set; } //炉管2
        public double EvaporationTemperature1 { get; set; } //蒸发温度1
        public double EvaporationTemperature2 { get; set; } //蒸发温度2
        public double EvaporationTemperature3 { get; set; } //蒸发温度3
        public double CrackingTemperature1 { get; set; } //裂解温度1
        public double CrackingTemperature2 { get; set; } //裂解温度2
        public double CrackingTemperature3 { get; set; } //裂解温度3
        public double AuxiliaryHeatingTemperature { get; set; } //辅热温度
        public double FreezingTemperature { get; set; } //冷冻温度
        public double SilowallTemperature { get; set; } //仓壁温度
        public double CouplingTemperature { get; set; }  // 偶联温度
        public double BinPressure { get; set; } //沉积压力
        public double PumpPressure { get; set; } //真空泵压力
        public double Bak1Temp { get; set; }   // 备用温度1
        public double Bak2Temp { get; set; }   // 备用温度2
        
        public override string ToString()
        {
            return $"Time: {Time}, " +
                   $"FurnaceCoverTemperature: {FurnaceCoverTemperature}, " +
                   $"FurnaceTubeTemperature1: {FurnaceTubeTemperature1}, " +
                   $"FurnaceTubeTemperature2: {FurnaceTubeTemperature2}, " +
                   $"EvaporationTemperature1: {EvaporationTemperature1}, " +
                   $"EvaporationTemperature2: {EvaporationTemperature2}, " +
                   $"EvaporationTemperature3: {EvaporationTemperature3}, " +
                   $"CrackingTemperature1: {CrackingTemperature1}, " +
                   $"CrackingTemperature2: {CrackingTemperature2}, " +
                   $"CrackingTemperature3: {CrackingTemperature3}, " +
                   $"AuxiliaryHeatingTemperature: {AuxiliaryHeatingTemperature}, " +
                   $"FreezingTemperature: {FreezingTemperature}, " +
                   $"SilowallTemperature: {SilowallTemperature}, " +
                   $"BinPressure: {BinPressure}, " +
                   $"PumpPressure: {PumpPressure}"  +
                   $"Bak1Temperature:{Bak1Temp}," +
                   $"Bak2Temperature:{Bak2Temp}";
        }

        public object Clone()
        {
            // 浅拷贝对象
            var data = (Data)MemberwiseClone();
            
            return data;
        }
    }
}
